* {
    padding: 0;
    margin: 0;
}

body {
    height: 100vh;
    background-color: #000;
    perspective: 900px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content {
    margin-top: -150px;
    width: 300px;
    height: 180px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 20s linear infinite;
}

.content:hover {
    animation-play-state: paused;
}

img {
    width: 200px;
    height: 150px;
}

.content div {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* 通过html5的-webkit-box-reflect来做倒影 */
    /* box-reflect属性值有：dirrection-方向:above向上，below向下，left向左，right向右。
    offset距离：可以是数值，也可以是百分比： mask-box-image设置倒影的遮罩图像：（1）url（2）linear-gradient线性渐变创建遮罩图像。（3）repeating-linear-gradient重复线性渐变创建遮罩图像。（4）repeating-url重复径向径向渐变创建遮罩图像。
 */
    -webkit-box-reflect: below 15px linear-gradient(transparent 10%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3));
}

.content div:nth-child(1) {
    transform: translateZ(300px);
    background-color: #c14c39;
}

.content div:nth-child(2) {
    transform: rotateY(60deg) translateZ(300px);
    background-color: #6e9c72;
}

.content div:nth-child(3) {
    transform: rotateY(120deg) translateZ(300px);
    background-color: #5e5f7a;
}

.content div:nth-child(4) {
    transform: rotateY(180deg) translateZ(300px);
    background-color: #f5eb98;
}

.content div:nth-child(5) {
    transform: rotateY(240deg) translateZ(300px);
    background-color: #50a3bc;
}

.content div:nth-child(6) {
    transform: rotateY(300deg) translateZ(300px);
    background-color: #f9a99a;
}

@keyframes rotate {
    0% {
        transform: rotateY(0);
    }

    100% {
        transform: rotateY(360deg);
    }
}